# Maintainer:
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Dan McGee <dan@archlinux.org>

pkgname=rdesktop
pkgver=1.9.0
pkgrel=2
pkgdesc="An open source client for Windows Remote Desktop Services"
arch=('loong64' 'x86_64')
url="https://www.rdesktop.org/"
license=('GPL3')
depends=('libao' 'libsamplerate' 'xorg-xrandr' 'pcsclite' 'libgssglue' 'libxcursor')
source=(https://github.com/rdesktop/rdesktop/archive/v${pkgver}.tar.gz)
sha512sums=('c5120ea615e4a83c9c86dd77e536d48218121dfce2425fa6b78b4d59f194e28a709dcc86ed410921759b2bafa4aab1bf0b89d4440b8ae5e4741d1af092b0fbcf')

prepare() {
  cd ${pkgname}-${pkgver}
  ./bootstrap
}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
    --enable-smartcard \
    --with-ipv6
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
